Add URL-based content lookup with incremental metadata updates#722
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
urlfield onContentNodeand a persistentUrlIndex, so pages can be looked up by their public URL instead of resolving the file path first (ContentResolver,ViewResolver,NavigationFunctionnow useContent#byUrl).Content#byUriis deprecated in favor ofbyPath/byUrl.SectionIndexsolistSectionEntriesno longer scans the whole metadata tree, and section lookups now work correctly even when a page has a customurl.ContentChangeCoordinator, and single file/directory changes update only the affected metadata instead of triggering a full resync. Directoryrenames are handled as a delete+create of the affected subtree. A watcher
OVERFLOWevent now triggers a full resync instead of being silently dropped.MemoryMetaData/MemoryQuery) and thequeryIndexModeswitch;PersistentMetaDatais now the only backend.25-ea.Fix included in this PR
ContentResolver#getContentwhere a content node with its ownredirect.location/redirect.statusset was returned as a normal (empty)DefaultContentResponseinstead of aRedirectContentResponse, because an earlierisRedirect()check already returned before the actual redirect-response branch was ever reached. The redirect and alias-redirect handling has been merged into a singleif/else ifchain so the correct branch is no longer unreachable.ContentResolver, and the unusedgetUrl(ReadOnlyFile)helper (and its now-unused imports) inAbstractCurrentNodeFunction, which was made obsolete by the switch toContentNode#url().